/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package employeemanagement;

/**
 *
 * @author pruthadesai
 */
public class ConcreteFormBuilder extends AbstractFormBuilder{
    
    private String empId = "";
    private String empName = "";
    private String empEmail = "";
    private int empSSN = 0;
    private int empLevel = 1;

    public ConcreteFormBuilder(int level, String empId, String empName, String empEmail, int empSSN) {
        
        this.empId = empId;
        this.empName = empName;
        this.empEmail = empEmail;
        this.empLevel = level;
        this.empSSN = empSSN;
    }

    
    
    @Override
    public void buildForm() {
        //EmployeeLevelFactory ef;
        EmployeeLevel1 ef1=null;
        EmployeeLevel2 ef2=null;
        EmployeeLevel3 ef3=null;
        if(empLevel == 1){
             ef1 = new EmployeeLevel1();
            ef1.createEmployeeLevel();
        }else if(empLevel == 2){
             ef2 = new EmployeeLevel2();
            ef2.createEmployeeLevel();
        }else if(empLevel == 3){
             ef3 = new EmployeeLevel3();
            ef3.createEmployeeLevel();
        }
        
        
        HealthPlanDetails hpd = new HealthPlanDetails();
        if(hpd.getHealthPlans(empLevel) instanceof Level1Strategy){
            Level1Strategy l1 = (Level1Strategy)hpd.getHealthPlans(empLevel);
            HealthPlanSelection hps = new HealthPlanSelection(l1,empLevel, hpd.header,this.empId, this.empName, this.empEmail, this.empSSN, ef1);
        }else if(hpd.getHealthPlans(empLevel) instanceof Level2Strategy){
            Level2Strategy l2 = (Level2Strategy)hpd.getHealthPlans(empLevel);
            HealthPlanSelection hps = new HealthPlanSelection(l2,empLevel,hpd.header,this.empId, this.empName, this.empEmail, this.empSSN, ef2);
        }else if(hpd.getHealthPlans(empLevel) instanceof Level3Strategy){
            Level3Strategy l3 = (Level3Strategy)hpd.getHealthPlans(empLevel);
            HealthPlanSelection hps = new HealthPlanSelection(l3,empLevel,hpd.header,this.empId, this.empName, this.empEmail, this.empSSN, ef3);
        }

        
        
        
    }

    @Override
    public void buildForm(int choice) {
        
    }
    
}
